package com.meetingshow.meeting.uiservice.model;

import java.util.Date;

import com.meetingshow.common.base.uiservice.model.BaseVO;
import com.meetingshow.meeting.dao.model.TopicPO;

public class TopicVO extends BaseVO {
    /**
     * 
     */
    private static final long serialVersionUID = -7224474466232213387L;
    
    private Integer topicId;
    private String topicName;
    private String topicDesc;
    private MeetingVO meeting;
    private Date createTime;

    public TopicVO() {
    }

    public TopicVO(TopicPO topicPO) {
        setTopicId(topicPO.getTopicId());
        setTopicName(topicPO.getTopicName());
        setTopicDesc(topicPO.getTopicDesc());
        setMeeting(new MeetingVO(topicPO.getMeeting()));
        setCreateTime(topicPO.getCreateTime());
    }

    public TopicPO toTopicPO() {
        TopicPO topicPO = new TopicPO();
        
        topicPO.setTopicId(getTopicId());
        topicPO.setTopicName(getTopicName());
        topicPO.setTopicDesc(getTopicDesc());
        topicPO.setMeeting(getMeeting().toMeetingPO());
        topicPO.setCreateTime(getCreateTime());
        
        return topicPO;
    }

    public Integer getTopicId() {
        return topicId;
    }

    public void setTopicId(Integer topicId) {
        this.topicId = topicId;
    }

    public String getTopicName() {
        return topicName;
    }

    public void setTopicName(String topicName) {
        this.topicName = topicName;
    }

    public String getTopicDesc() {
        return topicDesc;
    }

    public void setTopicDesc(String topicDesc) {
        this.topicDesc = topicDesc;
    }

    public MeetingVO getMeeting() {
        return meeting;
    }

    public void setMeeting(MeetingVO meeting) {
        this.meeting = meeting;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}
